<template>
  <div class="box">
    <MyInput type="password" placeholder="输入框" v-model:value="hello" ref="iptRef"></MyInput>
  </div>
</template>
<script setup lang="ts">
import { MyInput } from "@/components/index";
import { ref } from "vue";
const hello = ref("hello world");
const iptRef = useTemplateRef("iptRef");

setTimeout(() => {
  // hello.value = "hello worldfas";
  // console.log(iptRef.value?.);
  // console.log(iptRef.value.focus);
  
  // iptRef.value?.inputElement.focus()
  // iptRef.value?.value = "hello worldfas";
}, 1000);
</script>
<style lang="less" scoped>
.box {
  color: #60d659;
}
</style>
